import { getThreeListData } from '@/api'
const state = {
  categoryList: []
}
const mutations = {
  // 修改state中categoryList数据的方法
  setCategoryList(state, value) {
    state.categoryList = value
  }
}
const actions = {
  async getCategoryList({ commit }) {
    const res = await getThreeListData()
    // 调用函数 将请求到的值拿过去
    commit('setCategoryList', res)
  }
}
const getters = {
}
export default {
  // 命名空间打开
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}